package com.burstly.lib.component.networkcomponent.burstly.html;

import com.burstly.lib.constants.UriConstants;
import com.burstly.lib.network.request.RequestManager;
import com.burstly.lib.util.Utils;
import java.text.MessageFormat;

public class StatisticsSender
{
  public static final String MRAID_EVENT_TYPE = "mraid";
  public static final String ORMMA_EVENT_TYPE = "ormma";
  private static final String REQUEST_TEMPLATE = "http://{0}/Services/TrackStats.svc?zid={1}&crid={2}&geo=&pgt={3}&evt={4}";
  private String mBurstlyViewId;
  private String mCreativeId;
  private String mEventType;
  private String mZoneId;

  private String createUrl(String paramString)
  {
    Object[] arrayOfObject = new Object[5];
    arrayOfObject[0] = UriConstants.getInstance().getPrimaryHost();
    arrayOfObject[1] = this.mZoneId;
    arrayOfObject[2] = this.mCreativeId;
    arrayOfObject[3] = this.mEventType;
    arrayOfObject[4] = paramString;
    return MessageFormat.format("http://{0}/Services/TrackStats.svc?zid={1}&crid={2}&geo=&pgt={3}&evt={4}", arrayOfObject);
  }

  private void doSendEvent(String paramString)
  {
    RequestManager.makeTrackEventRequest(createUrl(paramString), this.mBurstlyViewId);
  }

  public void sendEvent(String paramString)
  {
    doSendEvent(paramString);
  }

  public static class StatisticsSenderBuilder
  {
    private String mBurstlyViewId;
    private String mCreativeId;
    private String mEventType;
    private String mZoneId;

    public StatisticsSender build()
    {
      Utils.checkNotNull(this.mEventType, "Event type can not be null");
      Utils.checkNotNull(this.mCreativeId, "Creative id can not be null");
      Utils.checkNotNull(this.mBurstlyViewId, "Burstly view id can not be null");
      Utils.checkNotNull(this.mZoneId, "Zone id can not be null");
      StatisticsSender localStatisticsSender = new StatisticsSender(null);
      StatisticsSender.access$102(localStatisticsSender, this.mBurstlyViewId);
      StatisticsSender.access$202(localStatisticsSender, this.mCreativeId);
      StatisticsSender.access$302(localStatisticsSender, this.mEventType);
      StatisticsSender.access$402(localStatisticsSender, this.mZoneId);
      return localStatisticsSender;
    }

    public StatisticsSenderBuilder setBurstlyViewId(String paramString)
    {
      this.mBurstlyViewId = paramString;
      return this;
    }

    public StatisticsSenderBuilder setCreativeId(String paramString)
    {
      this.mCreativeId = paramString;
      return this;
    }

    public StatisticsSenderBuilder setEventType(String paramString)
    {
      this.mEventType = paramString;
      return this;
    }

    public StatisticsSenderBuilder setZoneId(String paramString)
    {
      this.mZoneId = paramString;
      return this;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.burstly.html.StatisticsSender
 * JD-Core Version:    0.6.2
 */